package com.weixing.mall.provider.api.service;

import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.provider.api.fallback.GoodsFeignFallback;
import com.weixing.mall.provider.api.model.dto.SearchItem;
import com.weixing.mall.provider.api.model.vo.GoodsDetailsVo;
import com.weixing.mall.provider.api.model.vo.GoodsPlaceVo;
import com.weixing.mall.provider.api.model.vo.GoodsPointDetailsVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.ribbon.FeignRibbonClientAutoConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author: kfc
 * @Description: <br/>
 * Date:Create in 2019/10/9 15:49
 * @Modified By:
 */
@FeignClient(value ="mall-provider-goods",configuration = FeignRibbonClientAutoConfiguration.class,fallback = GoodsFeignFallback.class)
public interface GoodsFeign {

        @GetMapping("/api/goods/selectGoodsSearchVo")
        public Result<SearchItem> selectGoodsSearchVoByGoodsId(@RequestParam(value = "goodsId") long goodsId);
        @GetMapping("/api/goods/selectGoodsDetails")
        public Result<GoodsDetailsVo> selectGoodsDetails(@RequestParam(value = "goodsId") Long goodsId);

        @GetMapping("/api/goods/myGoodsHistory")
        public int selectMyGoodsHistory(@RequestParam(value = "memberId") Long memberId);

        @GetMapping("/api/goods/myGoodsStore")
        public int selectMyGoodsStore(@RequestParam(value = "memberId") Long memberId);

        @GetMapping("/api/goods/byGoodsIdImg")
        public Result<String> byGoodsIdImg(@RequestParam(value = "id") Integer id);
        @GetMapping("/api/goods/selectByGoodSn")
        public Result<List<GoodsPlaceVo>> selectGoodsSearchVo(@RequestParam(value = "goodsSnList") List<String> goodsSnList);
        @GetMapping("/api/goods/selectCommodityCode")
        public Result<String> selectCommodityCode(@RequestParam(value = "goodsSn") String goodsSn);
        @GetMapping("/api/goods/selectGoodsPointDetails")
        public Result<GoodsPointDetailsVo> selectGoodsPointByGoodsPointId(@RequestParam(value = "goodsPointId") Long goodsPointId);

}
